LinuxQMISDK-Lite  SLQS04.00.27
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
CtlService.h File Reference

Go to the source code of this file.

Data Structures

struct  CtlService
 

Typedefs

typedef struct CtlService CtlService
 

Functions

void CtlService_Initialize (CtlService *pThis, struct QmuxTransport *pTransport)
 
void CtlService_ShutDown (CtlService *pThis)
 
int CtlService_GetClientId (CtlService *pThis, uint8_t serviceType, uint8_t *clientId)
 
int CtlService_ReleaseClientId (CtlService *pThis, uint8_t serviceType, uint8_t clientId)
 
int CtlService_InitializeRegularService (CtlService *pThis, QmiService *pRegularService, uint8_t serviceType, QMI_INDICATION_CALLBACK pIndicationCallback, void *pIndicationCallbackContext)
 
int CtlService_ShutDownRegularService (CtlService *pThis, QmiService *pRegularService)
 

Typedef Documentation

typedef struct CtlService CtlService

This structure abstracts a CTL QMI service. It wraps a QMI service which is initialized to type CTL. Synchronous methods are provided for getting and releasing client IDs on behalf of other (regular) QMI services.

Parameters
service
  • QMI service object, initialized to be of type CTL.

Function Documentation

int CtlService_GetClientId ( CtlService pThis,
uint8_t  serviceType,
uint8_t *  clientId 
)

Get a client ID for a given QMI service type.

Parameters
[in]pThisThe primary object of this call.
[in]serviceTypeQMI service type.
[out]clientIdReturned client ID.
Returns
0 on success, < 0 on failure.
void CtlService_Initialize ( CtlService pThis,
struct QmuxTransport pTransport 
)

Initialize CTL service.

Parameters
[in]pThisThe primary object of this call.
[in]pTransportPointer to underlying transport layer which is responsible for sending and receiving QMUX packets
int CtlService_InitializeRegularService ( CtlService pThis,
QmiService pRegularService,
uint8_t  serviceType,
QMI_INDICATION_CALLBACK  pIndicationCallback,
void *  pIndicationCallbackContext 
)

Convenience function to initialize a QMI service object. Under the hood, it gets a client ID for a given QMI service type.

Parameters
[in]pThisThe primary object of this call.
[in]pRegularServiceUninitialized QMI service object.
[in]serviceTypeQMI service type.
[in]pIndicationCallbackUser function to be be called when QMI indications are received by the service.
[in]pIndicationCallbackContextA user context for callback.
Returns
0 on success, < 0 on failure.
int CtlService_ReleaseClientId ( CtlService pThis,
uint8_t  serviceType,
uint8_t  clientId 
)

Release a client ID for a given QMI service type. Client ID will have beeb previously obtained by invoking CtlService_GetClientId.

Parameters
[in]pThisThe primary object of this call.
[in]serviceTypeQMI service type.
[in]clientIdClient ID to be released.
Returns
0 on success, < 0 on failure.
void CtlService_ShutDown ( CtlService pThis)

Shut down CTL service.

Parameters
[in]pThisThe primary object of this call.
int CtlService_ShutDownRegularService ( CtlService pThis,
QmiService pRegularService 
)

Convenience function to shuit down a QMI service object. Under the hood, it releases a client ID for a given QMI service type.

Parameters
[in]pThisThe primary object of this call.
[in]pRegularServicePreviously initialized QMI service object.
Returns
0 on success, < 0 on failure.

Copyright (c) 2011-2015 Sierra Wireless, Inc. All rights reserved